package com.miage.util;
import java.io.*;

public class Convert {
    
public static String convert(String libelle) 
        {
       
        String old_eacute = "é";
        String new_eacute = "&eacute;";
        String old_egrave = "è";
        String new_egrave = "&egrave;";
        String old_ecirc = "ê";
        String new_ecirc = "&ecirc;";
        String old_euml = "ë";
        String new_euml = "&euml;";

        String old_agrave = "à";
        String new_agrave = "&agrave;";
        String old_acirc = "â";
        String new_acirc = "&acirc;";

        String old_ocirc = "ô";
        String new_ocirc = "&ocirc;";
        String old_ouml = "ö";
        String new_ouml = "&ouml;";

        String old_icirc = "î";
        String new_icirc = "&icirc;";
        String old_iuml = "ï";
        String new_iuml = "&iuml;";

        String old_ugrave = "ù";
        String new_ugrave = "&ugrave;";
        String old_ucirc = "û";
        String new_ucirc = "&ucirc;";
        String old_uuml = "ü";
        String new_uuml = "&uuml;";

        String old_ccedil = "ç";
        String new_ccedil = "&ccedil;";
        
        libelle = libelle.replaceAll(old_eacute, new_eacute);
        libelle = libelle.replaceAll(old_egrave, new_egrave);
        libelle = libelle.replaceAll(old_ecirc, new_ecirc);
        libelle = libelle.replaceAll(old_euml, new_euml);
        libelle = libelle.replaceAll(old_agrave, new_agrave);
        libelle = libelle.replaceAll(old_acirc, new_acirc);
        libelle = libelle.replaceAll(old_ocirc, new_ocirc);
        libelle = libelle.replaceAll(old_ouml, new_ouml);
        libelle = libelle.replaceAll(old_icirc, new_icirc);
        libelle = libelle.replaceAll(old_iuml, new_iuml);
        libelle = libelle.replaceAll(old_ugrave, new_ugrave);
        libelle = libelle.replaceAll(old_ucirc, new_ucirc);
        libelle = libelle.replaceAll(old_uuml, new_uuml);
        libelle = libelle.replaceAll(old_ccedil, new_ccedil);

        return libelle;
    }    
}

